package com.hxzy.jsp.utils;

import javax.servlet.http.Cookie;

/**
 * 包装跟请求相关的快捷操作
 * @author chenghaojun
 *
 */
public final class Requests {
	public static String getCookieVal(Cookie[] cookies, final String name) {
		if (cookies == null) {
			return "";
		}
		for (Cookie c : cookies) {
			if (c.getName().equals(name)) {
				return c.getValue();
			}
		}
		return "";
	}

}
